package com.rcloud.server.sealtalk.domain;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@Data
@Table(name = "users")
public class Users implements Serializable {
    private static final long serialVersionUID = 1L;

    //允许直接添加至群聊： 0 不允许 1 允许
    public static final Integer GROUP_VERIFY_NO_NEED = 1;
    public static final Integer GROUP_VERIFY_NEED = 0;

    //允许 通过手机号搜索到我： 0 不允许 1允许
    public static final Integer PHONE_VERIFY_NO_NEED = 1;
    public static final Integer PHONE_VERIFY_NEED = 0;
    //允许 SealTalk 号搜索到我： 0 不允许 1允许
    public static final Integer ST_SEARCH_VERIFY_NO_NEED = 1;
    public static final Integer ST_SEARCH_VERIFY_NEED = 0;

    //加好友需要验证环节
    public static final Integer FRI_VERIFY_NEED = 1;

    @Id
    @GeneratedValue(generator = "JDBC")
    private Integer id;

    @Column(name="region")
    private String region;

    @Column(name="phone")
    private String phone;

    @Column(name="nickname")
    private String nickname;

    @Column(name="background")
    private String background;

    @Column(name="portraitUri")
    private String portraitUri;

    @Column(name="passwordHash")
    private String passwordHash;

    @Column(name="passwordSalt")
    private String passwordSalt;

    @Column(name="rongCloudToken")
    private String rongCloudToken;

    private String gender;

    @Column(name="stAccount")
    private String stAccount;

    @Column(name="phoneVerify")
    private Integer phoneVerify;

    @Column(name="stSearchVerify")
    private Integer stSearchVerify;

    @Column(name="friVerify")
    private Integer friVerify;

    @Column(name="groupVerify")
    private Integer groupVerify;

    @Column(name="pokeStatus")
    private Integer pokeStatus;

    @Column(name="groupCount")
    private Integer groupCount;

    private Long timestamp;

    @Column(name="createdAt")
    private Date createdAt;

    @Column(name="updatedAt")
    private Date updatedAt;

    @Column(name="deletedAt")
    private Date deletedAt;
    /**
     * 用户姓名
     */
    @Column(name="name")
    private String name;
    /**
     * 用户姓名
     */
    @Column(name="identitycard")
    private String identitycard;
    /**
     * 身份证有效日期
     */
    @Column(name="valid_date")
    private String validDate;
    /**
     * 实名认证状态：0未认证 1已认证
     */
    @Column(name="is_real")
    private Integer isReal;
    /**
     * 认证费用支付状态：0未支付 1已支付
     */
    @Column(name="pay_auth_status")
    private Integer payAuthStatus;
    /**
     * 认证有效期 一般为一年
     */
    @Column(name="auth_valid_date")
    private Date authValidDate;
    /**
     * 刷脸认证标识 0 未通过 1已通过
     */
    @Column(name="is_face")
    private Integer isFace;
    /**
     * 刷脸认证标识 0 未通过 1已通过
     */
    @Column(name="is_merchant")
    private Integer isMerchant;

    /**
     * 广告开关 1全部接收 2好友推送 3全部关闭
     */
    @Column(name="advertisement_on")
    private Integer advertisementOn;

    /**
     * 广告发布可用总条数
     */
    @Column(name="available_time")
    private Integer availableTime;

    /**
     * 人脸识别认证时的图片
     */
    @Column(name="face_auth_img")
    private String faceAuthImg;

    /**
     * 人脸识别认证时的图片
     */
    @Column(name="`status`")
    private Integer status;

    /**
     * 邀请码
     */
    @Column(name="`invite_code`")
    private String inviteCode;

    /**
     * 邀请人ID
     */
    @Column(name="`invite_user_id`")
    private Integer inviteUserId;
    /**
     * 设备类型 0安卓  1ios
     */
    @Column(name="`platform`")
    private Integer platform;

    @Transient
    private Groups groups;

}